<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>right</title>
<link href="__PUBLIC__/Admin/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/Admin/js/jquery.js"></script>
<script type="text/javascript" language="javascript">
function delAd(id){
	if(confirm("您确定要删除此广告吗？")){
		$.ajax({
			async:false,
			type:'POST',
			url:'__URL__/delAd',
			data:'id='+id,
			success:function(msg){
				if ( msg == "success"){
					window.location.href = "__URL__/lists";
				}else{
					alert("删除失败！！！");
				}
			}
		});
	}
}
function editAd(id) {
	//window.navigate( "__URL__/editNews?id="+id );
	window.location.href = "__URL__/editAd?id="+id
}
</script>
</head>

<body>

<div id="container">
  <div id="main"> 
    <div id="content"> 
      <div class="weizhi"><span>当前位置：广告列表</span></div>
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;编号</td>
    <td>&nbsp;广告图片</td>
    <td>&nbsp;广告链接地址</td>
    <td>&nbsp;显示位置</td>
    <td>&nbsp;操作</td>
  </tr>
<volist name="adlist" id="list">
  <tr>
    <td>&nbsp;<{$list.id}></td>
    <td>&nbsp;<img width="150px" height="80px" src="/Public/Upload/<{$list.img}>"/></td>
    <td>&nbsp;<{$list.location}></td>
    <td>&nbsp;
    	<if condition="$list[place] eq 1">
        顶部
    	<elseif condition="$list[place] eq 2" />
        上方
        <elseif condition="$list[place] eq 3" />
        中上方
        <elseif condition="$list[place] eq 4" />
        中部
        <elseif condition="$list[place] eq 5" />
        中下方
        <elseif condition="$list[place] eq 6" />
        下方
        <elseif condition="$list[place] eq 7" />
        底部
        <elseif condition="$list[place] eq 8" />
        滚动图片
       </if>
    </td>
    <td>&nbsp;
    	<a href="javascript:;"><img onclick="delAd(<{$list.id}>)" alt="Delete" src="__PUBLIC__/Admin/assets/action_delete.png" title="删除" /></a> &nbsp;&nbsp;<a href="javascript:;"><img alt="Edit" title="修改" src="__PUBLIC__/Admin/assets/folder.png" onclick="editAd(<{$list.id}>)" /></a>
    </td>
  </tr>
</volist>
</table>

<{$page}>

	</div>
	</div>
</div>
</body>
</html>


